<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>Mathematical functions &mdash; NumPy v1.18 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../_static/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../_static/css/spc-extend.css">
    <link rel="stylesheet" href="../_static/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" >
    <link rel="stylesheet" href="../_static/graphviz.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.18.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script type="text/javascript" src="../_static/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../about.html" >
    <link rel="index" title="Index" href="../genindex.html" >
    <link rel="search" title="Search" href="../search.html" >
    <link rel="top" title="NumPy v1.18 Manual" href="../index.html" >
    <link rel="up" title="Routines" href="routines.html" >
    <link rel="next" title="numpy.sin" href="generated/numpy.sin.html" >
    <link rel="prev" title="numpy.not_equal" href="generated/numpy.not_equal.html" > 
  </head>
  <body>
<div class="container">
  <div class="top-scipy-org-logo-header" style="background-color: #a2bae8;">
    <a href="../index.html">
      <img border=0 alt="NumPy" src="../_static/numpy_logo.png"></a>
    </div>
  </div>
</div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        <li class="active"><a href="https://numpy.org/">NumPy.org</a></li>
        <li class="active"><a href="https://numpy.org/doc">Docs</a></li>
        
        <li class="active"><a href="../index.html">NumPy v1.18 Manual</a></li>
        

          <li class="active"><a href="index.html" >NumPy Reference</a></li>
          <li class="active"><a href="routines.html" accesskey="U">Routines</a></li> 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="generated/numpy.sin.html" title="numpy.sin"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="generated/numpy.not_equal.html" title="numpy.not_equal"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Mathematical functions</a><ul>
<li><a class="reference internal" href="#trigonometric-functions">Trigonometric functions</a></li>
<li><a class="reference internal" href="#hyperbolic-functions">Hyperbolic functions</a></li>
<li><a class="reference internal" href="#rounding">Rounding</a></li>
<li><a class="reference internal" href="#sums-products-differences">Sums, products, differences</a></li>
<li><a class="reference internal" href="#exponents-and-logarithms">Exponents and logarithms</a></li>
<li><a class="reference internal" href="#other-special-functions">Other special functions</a></li>
<li><a class="reference internal" href="#floating-point-routines">Floating point routines</a></li>
<li><a class="reference internal" href="#rational-routines">Rational routines</a></li>
<li><a class="reference internal" href="#arithmetic-operations">Arithmetic operations</a></li>
<li><a class="reference internal" href="#handling-complex-numbers">Handling complex numbers</a></li>
<li><a class="reference internal" href="#miscellaneous">Miscellaneous</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="generated/numpy.not_equal.html"
                        title="previous chapter">numpy.not_equal</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="generated/numpy.sin.html"
                        title="next chapter">numpy.sin</a></p>
<div id="searchbox" style="display: none" role="search">
  <h4>Quick search</h4>
    <div>
    <form class="search" action="../search.html" method="get">
      <input type="text" style="width: inherit;" name="q" />
      <input type="submit" value="search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="mathematical-functions">
<h1>Mathematical functions<a class="headerlink" href="#mathematical-functions" title="Permalink to this headline">¶</a></h1>
<div class="section" id="trigonometric-functions">
<h2>Trigonometric functions<a class="headerlink" href="#trigonometric-functions" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.sin.html#numpy.sin" title="numpy.sin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sin</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Trigonometric sine, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.cos.html#numpy.cos" title="numpy.cos"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cos</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Cosine element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.tan.html#numpy.tan" title="numpy.tan"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tan</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Compute tangent element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.arcsin.html#numpy.arcsin" title="numpy.arcsin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arcsin</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Inverse sine, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.arccos.html#numpy.arccos" title="numpy.arccos"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arccos</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Trigonometric inverse cosine, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.arctan.html#numpy.arctan" title="numpy.arctan"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arctan</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Trigonometric inverse tangent, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.hypot.html#numpy.hypot" title="numpy.hypot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hypot</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Given the “legs” of a right triangle, return its hypotenuse.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.arctan2.html#numpy.arctan2" title="numpy.arctan2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arctan2</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Element-wise arc tangent of <code class="docutils literal notranslate"><span class="pre">x1/x2</span></code> choosing the quadrant correctly.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.degrees.html#numpy.degrees" title="numpy.degrees"><code class="xref py py-obj docutils literal notranslate"><span class="pre">degrees</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Convert angles from radians to degrees.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.radians.html#numpy.radians" title="numpy.radians"><code class="xref py py-obj docutils literal notranslate"><span class="pre">radians</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Convert angles from degrees to radians.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.unwrap.html#numpy.unwrap" title="numpy.unwrap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">unwrap</span></code></a>(p[, discont, axis])</p></td>
<td><p>Unwrap by changing deltas between values to 2*pi complement.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.deg2rad.html#numpy.deg2rad" title="numpy.deg2rad"><code class="xref py py-obj docutils literal notranslate"><span class="pre">deg2rad</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Convert angles from degrees to radians.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.rad2deg.html#numpy.rad2deg" title="numpy.rad2deg"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rad2deg</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Convert angles from radians to degrees.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="hyperbolic-functions">
<h2>Hyperbolic functions<a class="headerlink" href="#hyperbolic-functions" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.sinh.html#numpy.sinh" title="numpy.sinh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sinh</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Hyperbolic sine, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.cosh.html#numpy.cosh" title="numpy.cosh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cosh</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Hyperbolic cosine, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.tanh.html#numpy.tanh" title="numpy.tanh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tanh</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Compute hyperbolic tangent element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.arcsinh.html#numpy.arcsinh" title="numpy.arcsinh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arcsinh</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Inverse hyperbolic sine element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.arccosh.html#numpy.arccosh" title="numpy.arccosh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arccosh</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Inverse hyperbolic cosine, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.arctanh.html#numpy.arctanh" title="numpy.arctanh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arctanh</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Inverse hyperbolic tangent element-wise.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rounding">
<h2>Rounding<a class="headerlink" href="#rounding" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.around.html#numpy.around" title="numpy.around"><code class="xref py py-obj docutils literal notranslate"><span class="pre">around</span></code></a>(a[, decimals, out])</p></td>
<td><p>Evenly round to the given number of decimals.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.round_.html#numpy.round_" title="numpy.round_"><code class="xref py py-obj docutils literal notranslate"><span class="pre">round_</span></code></a>(a[, decimals, out])</p></td>
<td><p>Round an array to the given number of decimals.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.rint.html#numpy.rint" title="numpy.rint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rint</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Round elements of the array to the nearest integer.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.fix.html#numpy.fix" title="numpy.fix"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fix</span></code></a>(x[, out])</p></td>
<td><p>Round to nearest integer towards zero.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.floor.html#numpy.floor" title="numpy.floor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">floor</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the floor of the input, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ceil.html#numpy.ceil" title="numpy.ceil"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the ceiling of the input, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.trunc.html#numpy.trunc" title="numpy.trunc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">trunc</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the truncated value of the input, element-wise.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="sums-products-differences">
<h2>Sums, products, differences<a class="headerlink" href="#sums-products-differences" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.prod.html#numpy.prod" title="numpy.prod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">prod</span></code></a>(a[, axis, dtype, out, keepdims, …])</p></td>
<td><p>Return the product of array elements over a given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.sum.html#numpy.sum" title="numpy.sum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sum</span></code></a>(a[, axis, dtype, out, keepdims, …])</p></td>
<td><p>Sum of array elements over a given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.nanprod.html#numpy.nanprod" title="numpy.nanprod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nanprod</span></code></a>(a[, axis, dtype, out, keepdims])</p></td>
<td><p>Return the product of array elements over a given axis treating Not a Numbers (NaNs) as ones.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.nansum.html#numpy.nansum" title="numpy.nansum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nansum</span></code></a>(a[, axis, dtype, out, keepdims])</p></td>
<td><p>Return the sum of array elements over a given axis treating Not a Numbers (NaNs) as zero.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.cumprod.html#numpy.cumprod" title="numpy.cumprod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cumprod</span></code></a>(a[, axis, dtype, out])</p></td>
<td><p>Return the cumulative product of elements along a given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.cumsum.html#numpy.cumsum" title="numpy.cumsum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cumsum</span></code></a>(a[, axis, dtype, out])</p></td>
<td><p>Return the cumulative sum of the elements along a given axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.nancumprod.html#numpy.nancumprod" title="numpy.nancumprod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nancumprod</span></code></a>(a[, axis, dtype, out])</p></td>
<td><p>Return the cumulative product of array elements over a given axis treating Not a Numbers (NaNs) as one.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.nancumsum.html#numpy.nancumsum" title="numpy.nancumsum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nancumsum</span></code></a>(a[, axis, dtype, out])</p></td>
<td><p>Return the cumulative sum of array elements over a given axis treating Not a Numbers (NaNs) as zero.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.diff.html#numpy.diff" title="numpy.diff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">diff</span></code></a>(a[, n, axis, prepend, append])</p></td>
<td><p>Calculate the n-th discrete difference along the given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ediff1d.html#numpy.ediff1d" title="numpy.ediff1d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ediff1d</span></code></a>(ary[, to_end, to_begin])</p></td>
<td><p>The differences between consecutive elements of an array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.gradient.html#numpy.gradient" title="numpy.gradient"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gradient</span></code></a>(f, \*varargs, \*\*kwargs)</p></td>
<td><p>Return the gradient of an N-dimensional array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.cross.html#numpy.cross" title="numpy.cross"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cross</span></code></a>(a, b[, axisa, axisb, axisc, axis])</p></td>
<td><p>Return the cross product of two (arrays of) vectors.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.trapz.html#numpy.trapz" title="numpy.trapz"><code class="xref py py-obj docutils literal notranslate"><span class="pre">trapz</span></code></a>(y[, x, dx, axis])</p></td>
<td><p>Integrate along the given axis using the composite trapezoidal rule.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="exponents-and-logarithms">
<h2>Exponents and logarithms<a class="headerlink" href="#exponents-and-logarithms" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.exp.html#numpy.exp" title="numpy.exp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">exp</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Calculate the exponential of all elements in the input array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.expm1.html#numpy.expm1" title="numpy.expm1"><code class="xref py py-obj docutils literal notranslate"><span class="pre">expm1</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Calculate <code class="docutils literal notranslate"><span class="pre">exp(x)</span> <span class="pre">-</span> <span class="pre">1</span></code> for all elements in the array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.exp2.html#numpy.exp2" title="numpy.exp2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">exp2</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Calculate <em class="xref py py-obj">2**p</em> for all <em class="xref py py-obj">p</em> in the input array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.log.html#numpy.log" title="numpy.log"><code class="xref py py-obj docutils literal notranslate"><span class="pre">log</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Natural logarithm, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.log10.html#numpy.log10" title="numpy.log10"><code class="xref py py-obj docutils literal notranslate"><span class="pre">log10</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the base 10 logarithm of the input array, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.log2.html#numpy.log2" title="numpy.log2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">log2</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Base-2 logarithm of <em class="xref py py-obj">x</em>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.log1p.html#numpy.log1p" title="numpy.log1p"><code class="xref py py-obj docutils literal notranslate"><span class="pre">log1p</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the natural logarithm of one plus the input array, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.logaddexp.html#numpy.logaddexp" title="numpy.logaddexp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">logaddexp</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Logarithm of the sum of exponentiations of the inputs.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.logaddexp2.html#numpy.logaddexp2" title="numpy.logaddexp2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">logaddexp2</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Logarithm of the sum of exponentiations of the inputs in base-2.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="other-special-functions">
<h2>Other special functions<a class="headerlink" href="#other-special-functions" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.i0.html#numpy.i0" title="numpy.i0"><code class="xref py py-obj docutils literal notranslate"><span class="pre">i0</span></code></a>(x)</p></td>
<td><p>Modified Bessel function of the first kind, order 0.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.sinc.html#numpy.sinc" title="numpy.sinc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sinc</span></code></a>(x)</p></td>
<td><p>Return the sinc function.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="floating-point-routines">
<h2>Floating point routines<a class="headerlink" href="#floating-point-routines" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.signbit.html#numpy.signbit" title="numpy.signbit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">signbit</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Returns element-wise True where signbit is set (less than zero).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.copysign.html#numpy.copysign" title="numpy.copysign"><code class="xref py py-obj docutils literal notranslate"><span class="pre">copysign</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Change the sign of x1 to that of x2, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.frexp.html#numpy.frexp" title="numpy.frexp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">frexp</span></code></a>(x[, out1, out2], / [[, out, where, …])</p></td>
<td><p>Decompose the elements of x into mantissa and twos exponent.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ldexp.html#numpy.ldexp" title="numpy.ldexp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ldexp</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Returns x1 * 2**x2, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.nextafter.html#numpy.nextafter" title="numpy.nextafter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nextafter</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Return the next floating-point value after x1 towards x2, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.spacing.html#numpy.spacing" title="numpy.spacing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">spacing</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the distance between x and the nearest adjacent number.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rational-routines">
<h2>Rational routines<a class="headerlink" href="#rational-routines" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.lcm.html#numpy.lcm" title="numpy.lcm"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lcm</span></code></a>(x1, x2, /[, out, where, casting, order, …])</p></td>
<td><p>Returns the lowest common multiple of <code class="docutils literal notranslate"><span class="pre">|x1|</span></code> and <code class="docutils literal notranslate"><span class="pre">|x2|</span></code></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.gcd.html#numpy.gcd" title="numpy.gcd"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gcd</span></code></a>(x1, x2, /[, out, where, casting, order, …])</p></td>
<td><p>Returns the greatest common divisor of <code class="docutils literal notranslate"><span class="pre">|x1|</span></code> and <code class="docutils literal notranslate"><span class="pre">|x2|</span></code></p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="arithmetic-operations">
<h2>Arithmetic operations<a class="headerlink" href="#arithmetic-operations" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.add.html#numpy.add" title="numpy.add"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add</span></code></a>(x1, x2, /[, out, where, casting, order, …])</p></td>
<td><p>Add arguments element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.reciprocal.html#numpy.reciprocal" title="numpy.reciprocal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">reciprocal</span></code></a>(x, /[, out, where, casting, …])</p></td>
<td><p>Return the reciprocal of the argument, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.positive.html#numpy.positive" title="numpy.positive"><code class="xref py py-obj docutils literal notranslate"><span class="pre">positive</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Numerical positive, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.negative.html#numpy.negative" title="numpy.negative"><code class="xref py py-obj docutils literal notranslate"><span class="pre">negative</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Numerical negative, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.multiply.html#numpy.multiply" title="numpy.multiply"><code class="xref py py-obj docutils literal notranslate"><span class="pre">multiply</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Multiply arguments element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.divide.html#numpy.divide" title="numpy.divide"><code class="xref py py-obj docutils literal notranslate"><span class="pre">divide</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Returns a true division of the inputs, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.power.html#numpy.power" title="numpy.power"><code class="xref py py-obj docutils literal notranslate"><span class="pre">power</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>First array elements raised to powers from second array, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.subtract.html#numpy.subtract" title="numpy.subtract"><code class="xref py py-obj docutils literal notranslate"><span class="pre">subtract</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Subtract arguments, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.true_divide.html#numpy.true_divide" title="numpy.true_divide"><code class="xref py py-obj docutils literal notranslate"><span class="pre">true_divide</span></code></a>(x1, x2, /[, out, where, …])</p></td>
<td><p>Returns a true division of the inputs, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.floor_divide.html#numpy.floor_divide" title="numpy.floor_divide"><code class="xref py py-obj docutils literal notranslate"><span class="pre">floor_divide</span></code></a>(x1, x2, /[, out, where, …])</p></td>
<td><p>Return the largest integer smaller or equal to the division of the inputs.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.float_power.html#numpy.float_power" title="numpy.float_power"><code class="xref py py-obj docutils literal notranslate"><span class="pre">float_power</span></code></a>(x1, x2, /[, out, where, …])</p></td>
<td><p>First array elements raised to powers from second array, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.fmod.html#numpy.fmod" title="numpy.fmod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fmod</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Return the element-wise remainder of division.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.mod.html#numpy.mod" title="numpy.mod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mod</span></code></a>(x1, x2, /[, out, where, casting, order, …])</p></td>
<td><p>Return element-wise remainder of division.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.modf.html#numpy.modf" title="numpy.modf"><code class="xref py py-obj docutils literal notranslate"><span class="pre">modf</span></code></a>(x[, out1, out2], / [[, out, where, …])</p></td>
<td><p>Return the fractional and integral parts of an array, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.remainder.html#numpy.remainder" title="numpy.remainder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">remainder</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Return element-wise remainder of division.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.divmod.html#numpy.divmod" title="numpy.divmod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">divmod</span></code></a>(x1, x2[, out1, out2], / [[, out, …])</p></td>
<td><p>Return element-wise quotient and remainder simultaneously.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="handling-complex-numbers">
<h2>Handling complex numbers<a class="headerlink" href="#handling-complex-numbers" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.angle.html#numpy.angle" title="numpy.angle"><code class="xref py py-obj docutils literal notranslate"><span class="pre">angle</span></code></a>(z[, deg])</p></td>
<td><p>Return the angle of the complex argument.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.real.html#numpy.real" title="numpy.real"><code class="xref py py-obj docutils literal notranslate"><span class="pre">real</span></code></a>(val)</p></td>
<td><p>Return the real part of the complex argument.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.imag.html#numpy.imag" title="numpy.imag"><code class="xref py py-obj docutils literal notranslate"><span class="pre">imag</span></code></a>(val)</p></td>
<td><p>Return the imaginary part of the complex argument.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.conj.html#numpy.conj" title="numpy.conj"><code class="xref py py-obj docutils literal notranslate"><span class="pre">conj</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the complex conjugate, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.conjugate.html#numpy.conjugate" title="numpy.conjugate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">conjugate</span></code></a>(x, /[, out, where, casting, …])</p></td>
<td><p>Return the complex conjugate, element-wise.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="miscellaneous">
<h2>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.convolve.html#numpy.convolve" title="numpy.convolve"><code class="xref py py-obj docutils literal notranslate"><span class="pre">convolve</span></code></a>(a, v[, mode])</p></td>
<td><p>Returns the discrete, linear convolution of two one-dimensional sequences.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.clip.html#numpy.clip" title="numpy.clip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code></a>(a, a_min, a_max[, out])</p></td>
<td><p>Clip (limit) the values in an array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.sqrt.html#numpy.sqrt" title="numpy.sqrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sqrt</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the non-negative square-root of an array, element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.cbrt.html#numpy.cbrt" title="numpy.cbrt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cbrt</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the cube-root of an array, element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.square.html#numpy.square" title="numpy.square"><code class="xref py py-obj docutils literal notranslate"><span class="pre">square</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Return the element-wise square of the input.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.absolute.html#numpy.absolute" title="numpy.absolute"><code class="xref py py-obj docutils literal notranslate"><span class="pre">absolute</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Calculate the absolute value element-wise.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.fabs.html#numpy.fabs" title="numpy.fabs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fabs</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Compute the absolute values element-wise.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.sign.html#numpy.sign" title="numpy.sign"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sign</span></code></a>(x, /[, out, where, casting, order, …])</p></td>
<td><p>Returns an element-wise indication of the sign of a number.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.heaviside.html#numpy.heaviside" title="numpy.heaviside"><code class="xref py py-obj docutils literal notranslate"><span class="pre">heaviside</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Compute the Heaviside step function.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.maximum.html#numpy.maximum" title="numpy.maximum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">maximum</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Element-wise maximum of array elements.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.minimum.html#numpy.minimum" title="numpy.minimum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">minimum</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Element-wise minimum of array elements.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.fmax.html#numpy.fmax" title="numpy.fmax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fmax</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Element-wise maximum of array elements.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.fmin.html#numpy.fmin" title="numpy.fmin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fmin</span></code></a>(x1, x2, /[, out, where, casting, …])</p></td>
<td><p>Element-wise minimum of array elements.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.nan_to_num.html#numpy.nan_to_num" title="numpy.nan_to_num"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nan_to_num</span></code></a>(x[, copy, nan, posinf, neginf])</p></td>
<td><p>Replace NaN with zero and infinity with large finite numbers (default behaviour) or with the numbers defined by the user using the <a class="reference internal" href="constants.html#numpy.nan" title="numpy.nan"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nan</span></code></a>,  <em class="xref py py-obj">posinf</em> and/or <em class="xref py py-obj">neginf</em> keywords.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.real_if_close.html#numpy.real_if_close" title="numpy.real_if_close"><code class="xref py py-obj docutils literal notranslate"><span class="pre">real_if_close</span></code></a>(a[, tol])</p></td>
<td><p>If complex input returns a real array if complex parts are close to zero.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.interp.html#numpy.interp" title="numpy.interp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">interp</span></code></a>(x, xp, fp[, left, right, period])</p></td>
<td><p>One-dimensional linear interpolation.</p></td>
</tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2019, The SciPy community.
      </li>
      <li>
      Last updated on Feb 20, 2020.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.4.2.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>